import java.util.Scanner;
public class yanghuisanjiao {
    public static void main(String [] args){
        Scanner scan = new Scanner(System.in);
        System.out.println("输入层数");
        int num = scan.nextInt();

        int arr[][] = new int[num][];
        for(int i = 0 ; i<num; i++){
            arr[i] = new int[i+1];
        }
        for(int i = 0 ; i < num ; i++){
            for(int q = 0 ; q<num-i; q++){
                System.out.print(" ");
            }
            for(int j = 0 ; j <= i ; j++ ){
                if(j==0 || j==i){
                    arr[i][j]=1;
                }else
                    arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
                    System.out.print(arr[i][j]+"  ");
            }
            System.out.println();
        }
    }
}
